package org.cli.admin;

import org.cli.admin.init.Application;
import org.cli.admin.init.InitConfigurationModule;

import com.google.inject.Guice;


public class Main {	
	private static boolean singleCommandMode;
	
	private static String commandLine;

	public static void main(String[] args) {
		if (args != null && args.length > 0) {

			StringBuilder sb = new StringBuilder();
			for (int i = 0; i < args.length; i++) {
				sb.append(args[i]);
				if (i != args.length - 1) {
					sb.append(" ");
				}
			}

			commandLine = sb.toString();
			singleCommandMode = true;
		}

		 Guice.createInjector(new InitConfigurationModule()).getInstance(Application.class).start();
	}

	public static String getCommandLine() {
		return commandLine;
	}

	public static boolean isSingleCommandMode() {
		return singleCommandMode;
	}
}
